<?= $this->partial('groups/menu.phtml'); ?>

<h1>Group: <?= $this->escape($this->group->name) ?></h1>

<table class='shaded'>
<tr>
	<th>Add user to this group</th>
</tr>
<tr>
	<td>
		<?= $this->form; ?>
	</td>
</tr>
</table>

<br>

<table width='100%' class='shaded'>
<tr>
	<th>Username</th>
	<th>&nbsp;</th>
</tr>
<?php if(count($this->members)) : ?>
<?php foreach($this->members as $member) : ?>
<tr class="<?= $this->alternator(array("odd","even")); ?>">
	<td><?php echo $this->escape($member->nickname);?></td>
	<td><a href="<?= $this->route("groups", "removemember", array("group"=>$this->group->id, "user"=>$member->id)); ?>">Remove</a></td>
</tr>
<?php endforeach; ?>
<?php else : ?>
<tr>
	<td colspan='2'>No members yet</td>
</tr>
<?php endif; ?>
</table>
